home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1997 #3
/
Amiga Plus CD - 1997 - No. 03.iso
/
pd
/
programmierung
/
alienbreed3d2_src
/
cheesesauce
/
testcache
< prev
next >
Wrap
Text File
|
1997-01-31
|
4KB
|
246 lines
maxscrdiv EQU 8
max3ddiv EQU 5
playerheight EQU 8*1024
xpos EQU 0 ;l
zpos EQU 4 ;l
zsinval EQU 8 ;w
zcosval EQU 10 ;w
ztox EQU 12 ;l
xsinval EQU 16 ;w
xcosval EQU 18 ;w
xspd EQU 20 ;w
zspd EQU 22 ;w
mapx EQU 24 ;b
mapz EQU 25 ;b
whichtile EQU 26 ;b
xofflight EQU 28 ;w
zofflight EQU 30 ;w
offlight EQU 32 ;w
zlinestore EQU 34
zlinedir EQU 38
zposdir EQU 40
zposstore EQU 42
xdiststore EQU 44
xdistdir EQU 46
zwallfound EQU 48
xlinestore EQU 50
xlinedir EQU 54
xposdir EQU 56
xposstore EQU 58
zdiststore EQU 60
zdistdir EQU 62
xwallfound EQU 64
midoffset EQU 104*4*40
SECTION Scrn,CODE_C
OpenLib equ -552 ; Offset for OpenLibrary.
CloseLib equ -414 ; Offset for CloseLibrary.
vhposr equ $006
vhposrl equ $007
bltcon0 equ $40
bltcon1 equ $42
bltcpt equ $48
bltbpt equ $4c
bltapt equ $50
spr0ctl equ $142
spr1ctl equ $14a
spr2ctl equ $152
spr3ctl equ $15a
spr4ctl equ $162
spr5ctl equ $16a
spr6ctl equ $172
spr7ctl equ $17a
spr0pos equ $140
spr1pos equ $148
spr2pos equ $150
spr3pos equ $158
spr4pos equ $160
spr5pos equ $168
spr6pos equ $170
spr7pos equ $178
bltdpt equ $54
bltafwm equ $44
bltalwm equ $46
bltsize equ $58
bltcmod equ $60
bltbmod equ $62
bltamod equ $64
bltdmod equ $66
diwstart equ $8e ; Screen hardware registers.
diwstop equ $90
ddfstart equ $92
ddfstop equ $94
bplcon0 equ $100
bplcon1 equ $102
col0 equ $180
col1 equ $182
col2 equ $184
col3 equ $186
col4 equ $188
col5 equ $18a
col6 equ $18c
col7 equ $18e
col8 equ $190
col9 equ $192
col10 equ $194
dmacon equ $96
dmaconr equ $002
intenar equ $01c
intena equ $09a
intreq equ $09c
intreqr equ $01e
intreqrl equ $01f
bpl1pth equ $e0
bpl1ptl equ $e2
bpl2pth equ $e4
bpl2ptl equ $e6
bpl3pth equ $e8
bpl3ptl equ $ea
bpl4pth equ $ec
bpl4ptl equ $ee
bpl5pth equ $f0
bpl5ptl equ $f2
bpl6pth equ $f4
bpl6ptl equ $f6
bpl7pth equ $f8
bpl7ptl equ $fa
** This waits for the blitter to finish before allowing program
** execution to continue.
WB MACRO
\@bf:
btst #6,dmaconr(a6)
bne.s \@bf
ENDM
*Another version for when d6 <> dff000
WBSLOW MACRO
\@bf:
btst #6,$dff000+dmaconr
bne.s \@bf
ENDM
**
include "macros.i"
include "ab3:source/defs.i"
jmp stuff
endstuff:
move.l #$dff000,a6 ; NB V. IMPORTANT: A6=CUSTOM BASE
*** Put myself in supervisor mode
move.l #blag,$80
trap #0
; move.l $6c,d0
; move.l #blag,$6c
; move.w #$8010,intreq(a6)
rts
saveit: ds.l 10
saveinters: dc.w 0
blag:
; move.w #$10,intreq(a6)
; move.l d0,$6c
; move.w #$7fff,intena(a6)
CACHE_ON d2
bsr putinmem
move.w #4,putinmem+2
CACHE_CLEAR d2
CACHE_ON d2
bsr putinmem
move.w #6,putinmem+2
bsr putinmem
rte
putinmem:
move.w #0,testit
rts
testit:
dc.w 0
old: dc.l 0
stuff:
move.l 4.w,a6 ; Get EXECBASE.
lea gfxname(PC),a1 ; Point to 'graphics.library' string.
moveq #0,d0 ; Ignore version number.
jsr OpenLib(a6) ; Open the library.
move.l d0,a1 ; Store library address.
move.l 38(a1),old ; Store workbench copper address.
move.l 4.w,a6 ; Get EXECBASE again.
jsr CloseLib(a6) ; Close the library.
jmp endstuff
gfxname dc.b "graphics.library",0
cnop 0,64
Panel:
incbin "PanelRaw"
scrntab:
ds.b 16
val SET 32
REPT 96
dc.b val,val,val
val SET val+1
ENDR
ds.b 16
cnop 0,64
scrn:
dcb.l 8,$33333333
dc.l 0
dc.l 0
dcb.l 8,$0f0f0f0f
dc.l 0
dc.l 0
dcb.l 8,$00ff00ff
dc.l 0
dc.l 0
dcb.l 8,$0000ffff
dc.l 0
dc.l 0
dc.l 0,-1,0,-1,0,-1,0,-1
dc.l 0
dc.l 0
dc.l -1,-1,0,0,-1,-1,0,0
dc.l 0
dc.l 0
dc.l 0,0,-1,-1,-1,-1,-1,-1
dc.l 0
dc.l 0